#!/usr/bin/make -f
# -*- makefile -*-
# Copyright (C) 2009 Romain Bignon
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

LANGUAGE_LIST = $(patsubst %.po,%,$(wildcard ??.po))

.PHONY: build
build: po4a.cfg blogit.pot
	po4a po4a.cfg

blogit.pot: ../plugin/blogit.vim
	intltool-update --gettext-package=blogit --pot

po4a.cfg: po4a.cfg.in
	sed 's/$$LANGUAGE_LIST/$(LANGUAGE_LIST)/g' $< > $@

%.po:
	touch $@ po4a.cfg.in
	make build

.PHONY: clean
clean:
	po4a --rm-translations po4a.cfg
	rm -f po4a.cfg blogit.pot blogit-doc.pot
